package com.arcaneshift.model.action.game;

import java.io.Serializable;

import com.arcaneshift.model.action.user.GameSession;

public class Player implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private GameSession session;
	private String gameId;
	private String channel;
	
	@Deprecated
	private int playerNumber;
	@Deprecated
	private Deck deck;
	@Deprecated
	private Hand hand;
	
	public Player() {}
	
	public Player(GameSession session) {
		this.session = session;
		this.setHand(new Hand());
	}
	
	public Player(GameSession session, String gameId) {
		this.session = session;
		this.gameId = gameId;
	}

	/**
	 * Check if the player is in a game right now. He is if the gameId is not null
	 * 
	 * @return
	 */
	public boolean isInGame() {
		return gameId != null;
	}
	
	public String getGameId() {
		return gameId;
	}

	public void setGameId(String gameId) {
		this.gameId = gameId;
	}

	public GameSession getSession() {
		return session;
	}

	public void setSession(GameSession session) {
		this.session = session;
	}

	public int getPlayerNumber() {
		return playerNumber;
	}

	public void setPlayerNumber(int playerNumber) {
		this.playerNumber = playerNumber;
	}

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}

	public Deck getDeck() {
		return deck;
	}

	public void setDeck(Deck deck) {
		this.deck = deck;
	}

	public Hand getHand() {
		return hand;
	}

	public void setHand(Hand hand) {
		this.hand = hand;
	}
}
